package com.yt.controller;

import cn.hutool.core.util.IdUtil;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import com.yt.service.PayServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.websocket.server.PathParam;

/**
 * @Classname PayController
 * @Description
 * @Date 2021/10/20 21:16
 * @Create by 杨涛
 */
@RestController
@Slf4j
public class PayController {
    @Resource
    PayServiceImpl payService;

    @RequestMapping("/getinfook")
    public String getinfo_timeok() {
        return payService.getinfo_ok();
    }

    @RequestMapping("/getinfoout")
    public String getinfo_timeout() {
        return payService.getinfo_timeout();
    }

    @GetMapping("/get/{id}")
    public String payCircuitBreaker(@PathVariable("id") Integer id){
        return payService.payCircuitBreaker( id);
    }
}
